$OpenBSD: patch-scripts_xdg-open_in,v 1.4 2017/05/09 07:11:55 ajacoutot Exp $

Fix sed(1) usage (i.e. !GNU sed).

Index: scripts/xdg-open.in
--- scripts/xdg-open.in.orig
+++ scripts/xdg-open.in
@@ -338,7 +338,7 @@ DEBUG 3 "$xdg_user_dir:$xdg_system_dirs"
 
 open_generic_xdg_file_mime()
 {
-    filetype=`xdg-mime query filetype "$1" | sed "s/;.*//"`
+    filetype=`xdg-mime query filetype "$1" | sed "s/[ ;].*//"`
     open_generic_xdg_mime "$1" "$filetype"
 }
 
@@ -415,7 +415,7 @@ open_generic()
     if [ x"$BROWSER" = x"" ]; then
         BROWSER=www-browser:links2:elinks:links:lynx:w3m
         if has_display; then
-            BROWSER=x-www-browser:firefox:iceweasel:seamonkey:mozilla:epiphany:konqueror:chromium:chromium-browser:google-chrome:$BROWSER
+            BROWSER=x-www-browser:firefox:chrome:iceweasel:seamonkey:mozilla:epiphany:midori:konqueror:chromium-browser:google-chrome:$BROWSER
         fi
     fi
 
